<template>
  <div class="all_page">
    <div class="info" v-for="(item,index) in dataArr" :key="index">
      <div class="info_top">
        <p>{{item.prodName}}</p>
        <img :src="require('../../assets/images/order/jiantou.png')" alt="" />
      </div>
      <div class="info_center">
        <div class="img">
          <img
            :src="require('../../assets/images/order/xiaolian.png')"
            alt=""
          />
        </div>
        <div class="content">
          <p>{{item.cusName}}</p>
          <p>下单时间 {{item.orderTime}}</p>
          <p>下单人 {{item.orderUserName}}</p>
        </div>
      </div>
      <div class="info_down">
        <div class="btn" v-show="item.status==20" @click.stop="pingjia(item.serialNo)">评价</div>
        <div class="btn" v-show="item.status==30" @click.stop="pingjia(item.serialNo)">查看评价</div>
      </div>
    </div>
  </div>
</template>
<script>
import { PingjiaApi,dingdanApi} from "../../request/api";
export default {
  data() {
    return {
      dataArr:[],
    };
  },
  methods: {
    pingjia(serialNo) {
      this.$router.push("/pingfen2/"+serialNo);
      // console.log(serialNo);   
    },
  },
  created() {
    PingjiaApi({
      params: {
        current: 1,
        size: 1,
        keyword: 1,
      },
    }).then((res) => {
      console.log(res);
      this.dataArr = res.data.records
    });
  },
};
</script>

<style lang="less" scoped>
.all_page {
  margin-top: 10px;
  background-color: #f5f5f5;
}
.info {
  padding: 0 20px;
  background-color: #fff;
  margin-top: 10px;
  .info_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    img {
      width: 16px;
      height: 16px;
      color: #000;
    }
  }
  .info_center {
    width: 100%;
    height: 103px;
    background-color: #fff;
    padding: 16px 0 0 21px;
    box-sizing: border-box;
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    border-top: 1px solid #e5e5e5;
    .img {
      width: 59px;
      height: 59px;
      // border: 1px solid #000;
      img {
        width: 100%;
      }
    }
    .content {
      margin-left: 16px;
      p {
        height: 19px;
        line-height: 19px;
        &:nth-of-type(2) {
          margin: 4px 0;
        }
      }
    }
  }
  .info_down {
    width: 100%;
    height: 50px;
    // border: 1px solid #000;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    .btn {
      width: 70px;
      height: 30px;
      border-radius: 15px;
      background-color: #ffcc33;
      text-align: center;
      line-height: 30px;
      color: #fff;
    }
  }
}
</style>